package com.designoutput.utils
{
	import flash.geom.Matrix;
	import flash.geom.Point;
	import flash.geom.Rectangle;

	public class MathUtils
	{
		public static function round(value:Number, precision:int = 0):Number {
			var decimal:Number = Math.pow(10, precision);
			return Math.round(decimal* value) / decimal;
		}
		
		public static function roundInterval(value:Number, interval:Number):Number {
			return Math.round(value / interval) * interval;
		}
		
		private static var PIPerDegree:Number = Math.PI / 180;
		
		public static function radianToDegrees(value:Number):Number {
			return value / PIPerDegree;
		}
		
		public static function degreesToRadian(value:Number):Number {
			return value * PIPerDegree;
		}
	}
}